<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
    <title>Gesture Simulate Tests</title>
    <script src="../../../../build/yui/yui.js"></script>
    <style type="text/css">
        #touchable {
            margin-bottom:20px;
            width: 600px;
            height: 250px;
            background-color: yellowgreen;
        }
        #glasspane {
            width: 600px;
            height: 250px;
            background-color: blue;
        }
    </style>
</head>
<body class="yui3-skin-sam">
    <div id="log"></div>
    <div id="touchable"><div id="glasspane"></div></div>
    <script>
    YUI({
        filter: (window.location.search.match(/[?&]filter=([^&]+)/) || [])[1] || 'min',
        coverage: ['gesture-simulate'],
        modules: {
            'gesture-simulate-tests': {
                fullpath: './gesture-simulate-tests.js',
                requires: ['test', 'node', 'event-touch', 'gesture-simulate']
            }
        }
    }).use('gesture-simulate-tests', 'test-console', function (Y) {
        new Y.Test.Console({render: '#log'});

        // The console collapse button disabled. If the button is pressed during
        // the tests, the tests will produce invalid results. It affects the
        // coordination calculation.
        //
        // It appeared thete is no console property to disable the button. I
        // tried CSS display:none as well but it made the console widget UI
        // incorrect. So I ended up this way.
        var btn = Y.one(".yui3-console-collapse"),
            parent = btn.get("parentNode");
            parent.insertBefore("<div>Collapse Disabled</div>", btn);
            btn.remove();

        Y.Test.Runner.setName('Gesture Simulate');
        Y.Test.Runner.run();
    });
    </script>
</body>
</html>
